$NG.AllReady(function (page, { useAction, useBeforeClick, useValuesChange, useClick, useUpdateRow, subscribe, useUpdateRows }) {
    const mstform = $NG.getCmpApi("p_form_dsh__m")
    const dgrid1 = $NG.getCmpApi("")
    const getHeadValue = (str)=>mstform.getItem(str).getValue()

    useValuesChange(()=>{
        getZcpProjectInfobyPhid()
    },"p_form_dsh__m.u_zzjgmc")

    // 获取项目库信息
    function getZcpProjectInfobyPhid(){
        const phid = getHeadValue("u_zzjgmc")
        if(!phid) return 
        $NG.execServer("getZcpProjectInfobyPhid",{phid},(res)=>{
            if(res.count == 0) return 
            const datas = JSON.parse(res.data)[0].extendObjects
            $NG.updateState((updater)=>{
                updater.data.p_form_dsh__m.setProps({
                    bill_no:datas.bill_no,
                })
            })
        })
    }
})
